package com.cn.kabalifemerchants.view.dialogView;//package com.cn.automobileservice.view.dialogView;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.EditText;

import com.cn.kabalifemerchants.R;
import com.flyco.roundview.RoundTextView;


/**
 * Created by 晓林 on 2019/10/18.
 * function: 首页。提示框。是否是大掌柜，。
 */
public class ApplyShopDialog extends Dialog {
    protected Context mContext;

    protected WindowManager.LayoutParams mLayoutParams;

    EditText et_name;
    RoundTextView tv_btn_next;

    public EditText getEt_name() {
        return et_name;
    }

    public RoundTextView getTv_btn_next() {
        return tv_btn_next;
    }

    public ApplyShopDialog(Context context) {
        super(context);
        initView(context);
    }

    public ApplyShopDialog(Activity context) {
        super(context);
        initView(context);
    }


    private void initView(Context context) {
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        this.getWindow().setBackgroundDrawableResource(R.drawable.transparent_bg);
        mContext = context;
        Window window = this.getWindow();
        mLayoutParams = window.getAttributes();
        mLayoutParams.alpha = 1f;
        window.setAttributes(mLayoutParams);
        if (mLayoutParams != null) {
            mLayoutParams.height = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
            mLayoutParams.gravity = Gravity.CENTER;
        }
        View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.dialog_apply_money, null);
        et_name = dialogView.findViewById(R.id.et_name);
        tv_btn_next = dialogView.findViewById(R.id.tv_btn_next);
        setContentView(dialogView);

    }
}
